/*
 * Copyright 2009 Jinbo Lin. All rights reserved.
 * 
 * cn.edu.pku.model OfficeAutomation
 *
 * Created on 2009-12-25
 */
package cn.edu.pku.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Jinbo Lin
 * 
 *  
 */
public class Privilege implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3345400330606547633L;
	private int privilegeId;
	private String privilegeName;
	private User creator;
	private Date dateTime;
	private User auditor;
	private String audit;
	private Date auditDateTime;
	private String removed;
	private String remark;
	
	private Set<User> users = new HashSet<User>();
	private Set<Role> roles = new HashSet<Role>();

	/**
	 * @return the privilegeId
	 */
	public int getPrivilegeId() {
		return this.privilegeId;
	}

	/**
	 * @param privilegeId the privilegeId to set
	 */
	public void setPrivilegeId(int privilegeId) {
		this.privilegeId = privilegeId;
	}

	/**
	 * @return the privilegeName
	 */
	public String getPrivilegeName() {
		return this.privilegeName;
	}

	/**
	 * @param privilegeName the privilegeName to set
	 */
	public void setPrivilegeName(String privilegeName) {
		this.privilegeName = privilegeName;
	}

	/**
	 * @return the creator
	 */
	public User getCreator() {
		return this.creator;
	}

	/**
	 * @param creator the creator to set
	 */
	public void setCreator(User creator) {
		this.creator = creator;
	}

	/**
	 * @return the dateTime
	 */
	public Date getDateTime() {
		return this.dateTime;
	}

	/**
	 * @param dateTime the dateTime to set
	 */
	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}

	/**
	 * @return the auditor
	 */
	public User getAuditor() {
		return this.auditor;
	}

	/**
	 * @param auditor the auditor to set
	 */
	public void setAuditor(User auditor) {
		this.auditor = auditor;
	}

	/**
	 * @return the audit
	 */
	public String getAudit() {
		return this.audit;
	}

	/**
	 * @param audit the audit to set
	 */
	public void setAudit(String audit) {
		this.audit = audit;
	}

	/**
	 * @return the auditDateTime
	 */
	public Date getAuditDateTime() {
		return this.auditDateTime;
	}

	/**
	 * @param auditDateTime the auditDateTime to set
	 */
	public void setAuditDateTime(Date auditDateTime) {
		this.auditDateTime = auditDateTime;
	}

	/**
	 * @return the removed
	 */
	public String getRemoved() {
		return this.removed;
	}

	/**
	 * @param removed the removed to set
	 */
	public void setRemoved(String removed) {
		this.removed = removed;
	}

	/**
	 * @return the remark
	 */
	public String getRemark() {
		return this.remark;
	}

	/**
	 * @param remark the remark to set
	 */
	public void setRemark(String remark) {
		this.remark = remark;
	}

	/**
	 * @return the users
	 */
	public Set<User> getUsers() {
		return this.users;
	}

	/**
	 * @param users the users to set
	 */
	public void setUsers(Set<User> users) {
		this.users = users;
	}

	/**
	 * @return the roles
	 */
	public Set<Role> getRoles() {
		return this.roles;
	}

	/**
	 * @param roles the roles to set
	 */
	public void setRoles(Set<Role> roles) {
		this.roles = roles;
	}

	/**
	 * 
	 */
	public Privilege() {
	}

	/**
	 * @param privilegeId
	 * @param privilegeName
	 * @param creator
	 * @param dateTime
	 */
	public Privilege(int privilegeId, String privilegeName, User creator,
			Date dateTime) {
		this.privilegeId = privilegeId;
		this.privilegeName = privilegeName;
		this.creator = creator;
		this.dateTime = dateTime;
	}

	/**
	 * @param privilegeId
	 * @param privilegeName
	 * @param creator
	 * @param dateTime
	 * @param auditor
	 * @param audit
	 * @param auditDateTime
	 * @param removed
	 * @param remark
	 */
	public Privilege(int privilegeId, String privilegeName, User creator,
			Date dateTime, User auditor, String audit, Date auditDateTime,
			String removed, String remark) {
		this.privilegeId = privilegeId;
		this.privilegeName = privilegeName;
		this.creator = creator;
		this.dateTime = dateTime;
		this.auditor = auditor;
		this.audit = audit;
		this.auditDateTime = auditDateTime;
		this.removed = removed;
		this.remark = remark;
	}

}
